package com.mohan.dlxj.mapper;

import com.mohan.dlxj.pojo.Flaw;
import com.mohan.dlxj.pojo.FlawType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Value;

import java.util.List;

@Mapper
public interface FlawMapper {
  List<FlawType> selectAllTyle(long current, long limit);

  long selectAllType();

  void saveType(FlawType flawType);

  void updateType(FlawType flawType);

  List<Flaw> selectAllFlaw(long current,long limit);

  long selectAllFlawNumber();

  void updateFlaw(long id);

  List<Flaw> selectSomeFlaw(long current, long limit,Flaw flaw);

  long selectSomeFlawNum();

  void updateLevel(long id,long level);

  @Select("select * from flaw where id=#{id}")
  Flaw getFlawById(long id);
}
